/*
 * 系统项目名称：综合决策分析系统-version2.0
 * 文件名：ShopCompanyService.java
 * 描述：
 * 版权：Copyright 2015-2020 义乌市跨境电商供应链管理有限公司-版权所有
 * 修改人：yangjx
 * 修改时间：2016-3-11 下午1:41:45
 * 版本号：V1.1
 */
package com.ywt.cda.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ywt.cda.action.model.GoodsModel;
import com.ywt.cda.core.dao.page.Page;
import com.ywt.cda.domain.Ana2ndData;
import com.ywt.cda.domain.Ana3rdData;
import com.ywt.cda.domain.AnaExportData;
import com.ywt.cda.domain.AnaImportData;
import com.ywt.cda.domain.enums.DimensionFlag;
import com.ywt.cda.domain.enums.OrderByEnum;
import com.ywt.cda.service.vo.ExportGoodsDetailVo;

/**
 * （一句话功能简述） <br>
 * （功能详细描述）
 * 
 * @author lougf
 * @version V1.0
 * @see [相关类/方法]
 * @since 2016-3-11 下午1:41:45
 */
public interface GoodsService {
	List<Ana2ndData> getTopNGoodsData(GoodsModel model, int topN,
			OrderByEnum orderBy, DimensionFlag dimensionFlag);

	List<Ana2ndData> getMcategoryByDateFlag(GoodsModel model);
	
	void toJsonArray(List<Ana2ndData> data, JSONArray jsonArray,OrderByEnum orderByEnum, DimensionFlag dimensionFlag);
	
	void initDataMainName(List<Ana2ndData> data, DimensionFlag dimensionFlag);



	List<AnaImportData> getTopNGoodsImortData(GoodsModel model, int topN,
											  OrderByEnum orderBy, DimensionFlag dimensionFlag);

	void toJsonArrayImort(List<AnaImportData> data, JSONArray jsonArray,OrderByEnum orderByEnum, DimensionFlag dimensionFlag);

	void initImportDataMainName(List<AnaImportData> data, DimensionFlag dimensionFlag);

	List<String> getItemNameListByKeyword(String keyword);

	List<AnaImportData> getGoodsImortDataByDateFlag(GoodsModel model,String province,String keywordCode);

	List<AnaImportData> getGoodsImortDataByCountry(GoodsModel model,String province,String keywordCode);

	List<AnaImportData> getGoodsImortDataByCategory(GoodsModel model,String province,String keywordCode);

	Long getAllProvinceSumNum(GoodsModel model,  String keywordCode);

	List<AnaImportData> getGoodsImortDataBySex(GoodsModel model, String province, String keywordCode);

	List<AnaImportData> getGoodsImortDataByAge(GoodsModel model, String province, String keywordCode);

	List<String> getExportItemNameListByKeyword(String keyword);

	List<AnaExportData> getGoodsExportDataByDateFlag(GoodsModel model, String country, String keywordCode);

	List<AnaExportData> getGoodsExportDataByCountry(GoodsModel model, String keywordCode);




	Long getAllExportCountrySumNum(GoodsModel model,  String keywordCode);

	ExportGoodsDetailVo getTopOneData(GoodsModel exportGoodsModel,
			List<Ana2ndData> datas3);

	void setGoodsJsonObject(GoodsModel exportGoodsModel,
			ExportGoodsDetailVo goodsDetailVo, JSONObject goodsJsonObject);

	void updateModel(GoodsModel exportGoodsModel);

	ExportGoodsDetailVo getTopOneData(GoodsModel exportGoodsModel,
			String mainCode,Page page);

	ExportGoodsDetailVo getTopOneData(GoodsModel exportGoodsModel,
			String mainCode, String goodsName,Page page);
	
	/**
	 * 
	 * 根据商品品类获取进口数据
	 * <br>(这里描述这个方法适用条件 – 可选)
	 * @param model
	 * @param province
	 * @param keywordCode
	 * @return 
	 * @exception 
	 * @since 2016年5月5日 下午9:05:40
	 * @author 张爽
	 */
	List<AnaImportData> getImportDataByCode(GoodsModel model,String mainCode,String secondFlag);

	List<Ana3rdData> getGoodsMData(int month);

	List<Ana3rdData> getTBandHB(String date1, String date2, String date3);

	List<Map<String, Object>> goodsCategoriesMList(String firstday, String today);

	List<Map<String, Integer>> goodsCategoriesByCountryMList(String firstday, String today, String main_code);

    List<Map<String,Object>> getTopCountryList(String firstday, String today, int topN);

	List<Map<String, Integer>> getTopCountryCategoriesList(String firstday, String today, String countryCode, int topN);

	List<String> getTopCategoryList(String firstday, String today, int topN);

	List<Map<String,Object>> getCountryByCategoriesList(String firstday, String today, String countryCode,List<String> topCategoryList);

	List<Integer> getSumCategoryNum(String firstday, String today, List<String> topCategoryList);

	List<Map<String,Object>> getGoodRangeData(int topN);

    List<Map<String, Object>> getCategoryMonthData(int monthN, String categoryName);

	Integer getYesterdayCount(String yesterday);

	Integer getThisMonthCount(String thisMonth);

	Integer getThisYearCount(String thisYear);

	List<Map<String,Object>> getTopCountryNameList(String firstday, String today, int topN);

	Integer getAllCountrySum();

	Map<String, Object> getSumSalesCount();

	Map<String, Object> getDHSumSalesCount();

	List<Map<String, Object>> getTopCategorySumList(String starttime, String endtime, int i);

	Integer getCoustomerNum();

	List<Map<String,Object>> getAllCountryCategory(List<String> topCategoryList);

	String getContinentTop10();
}
